function Scene()
{
	
	var _current = null;
	var _next	 = null;
	
	this.getCurrent = function()
	{
		return _current;
	}
	
	this.getNext = function()
	{
		return _next;
	}
	
	this.setNext = function(next)
	{
		if (_current)
			_current.terminate();
		_next = next;
	}
	
	this.update = function()
	{
		if (_next)
		{
			_current = _next;
			_next    = null;
			if (_current)
				_current.start();
		}
		if (!_current)
			return;
		_current.update();
	}
	
	this.draw = function(context)
	{
		if (!_current)
			return;
		_current.draw(context);
	}
	
}